package com.cash.loan.modular.cash.service.impl;

import com.cash.loan.modular.cash.dao.LoanProductMapper;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author Administrator
 * @Date 2018-11-30 10:54
 */
public class CommonService {

    @Autowired
    private LoanProductMapper productMapper;

    /**
     * 判断产品是否为可下载的产品
     * @param productId
     * @return
     */
    protected boolean isDownloadProductAd(Long productId) {
        Integer downloadFlag = productMapper.getDownloadFlag(productId);
        if(Integer.valueOf(0).equals(downloadFlag)) {
            return false;
        } else {
            return true;
        }
    }
}
